package net.lab1024.sa.admin.module.basedata.customer.controller;

import net.lab1024.sa.admin.module.basedata.customer.domain.entity.CustomerLicense;
import net.lab1024.sa.admin.module.basedata.customer.service.CustomerLicenseService;
import net.lab1024.sa.base.common.domain.ResponseDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/customers/license")
public class CustomerLicenseController {

    @Autowired
    private CustomerLicenseService customerLicenseService;


    @PostMapping("/saveOrUpdateCustomerLicense")
    public ResponseDTO<Object> saveOrUpdateCustomerLicense(@RequestBody CustomerLicense customerLicense) {
        customerLicenseService.saveOrUpdateCustomerLicense(customerLicense);
        return ResponseDTO.ok();
    }

}
